home *** CD-ROM | disk | FTP | other *** search
-
-
- const
- ARRAY_MAX = 10;
- type
- array_of_integer = array [1 .. ARRAY_MAX] of integer;
-
- {*
- * Compare two arrays of integers, a and b. Return TRUE
- * if for all i from 1 to n, a[i] = b[i]; return FALSE
- * otherwise.
- *}
- function equal(var a, b : array_of_integer; n : word)
- : boolean;
- var
- i : word;
- begin
- i := 1;
- while (i <= n) and (a[i] = b[i]) do
- i := i + 1;
- equal := i > n;
- end;
-
-